<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>任务列表</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .title{
            line-height: 40px;
            font-size: 22px;
            font-weight: bold;
            text-align: center;
            color: rgb(223, 132, 99);
        }
        .title2{
            line-height: 20px;
            font-size: 14px;
            font-weight: bold;
            text-align: center;
            color: rgb(223, 132, 99);
        }
        .t3{
            color: orange;
            font-size: 18px;
        }
        .list .item{
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 20px;
        }
        .list .item .left img{
            width: 40px;
            border-radius: 50%;
            border: 2px solid orange;
            background-color: bisque;
        }
        .list .item .middle .name{
           color: rgb(54, 47, 47);
           font-weight: bold;
           font-size: 18px;
           min-width: 240px;
           
        }
        .list .item .middle .desc{
            color: rgb(206, 148, 40);
            font-size: 12px;
        }
        .right button{
            border-radius: 20px;
            background-color: gold;
            border-color: chocolate;
            color: chocolate;
            width: 60px;
            height: 30px;
            
        }
    </style>
</head>
<body>
     <div id="app">
        <div class="title">任务列表</div>
        <div class="title2">每完成一个任务,即可获得 <span class="t3">10MB-1GB</span> 流量哦!</div>
        <div class="list">
            <div class="item" v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="left">
                    <img v-bind:src="item.pic" alt="">
                    
                </div>
                <div class="middle">
                    <div class="name"> {{ item.name }} </div>
                    <div class="desc"> {{ item.desc }} </div>
                </div>
                <div class="right">
                    <button> {{ item.status == 1 ? '去完成' : (item.status == 2 ? '领取' : '已领取') }} </button>
                </div>
            </div>
        </div>
    </div>

</body>
</html>
<script src="../js/vue-2.5.21.js"></script>
<script>
    
     var v = new Vue({
            
            el:'#app', //el Vue实例挂载的dom节点
            data: {
                tasklist:[
                    { id:1, pic:'../img/7.webp', name:'咪咕视频送流量',desc:'来咪咕视频,每月领500MB流量奖励',status:1 },
                    { id:2, pic:'../img/8.webp', name:'和彩云送福利',desc:'免费领100G空间+同月2GB',status:2 },
                    { id:3, pic:'../img/9.webp', name:'最高40元套餐折扣券',desc:'参与抽奖,奖励10MB,经验值+10',status:3 },
                    { id:4, pic:'../img/9.webp', name:'吃喝玩乐季，超级秒杀',desc:'进入隐藏二楼参与秒杀,奖励10MB,经验值+10',status:1 },
                ]
            } , 
            computed: {} , 
            watch: {} ,
            methods: {} , 
            filters: {} , 
            directives: {} , 
            components: {} , 
        }) 

    </script>
</script>